package ch4;

import java.util.*;

public class CheckPass2 {

	public static void main(String[] args) {
		// 检查是否合格
		boolean result = false;
		Scanner in = new Scanner(System.in);

		while (result == false) {
			System.out.println("上午学习理论\n下午上机");
			System.out.println("请老师检查是否合格？");
			result = in.nextBoolean();
			if (result == false)
				System.out.println("不合格，重来");
		}

		System.out.println("合格了，回家睡觉");
	}

}
